package project4;
// 学生类 -- 实体类
public class Student {
    // 私有的属性
    private int id;
    private String name;
    private String sex;
    private int age;
    // 有参无参构造器   右键 --> generate

    public Student() {
    }
    public Student(int id, String name, String sex, int age) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
    }
    // 公共的get和set方法

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    // show
    public void show(){
        System.out.println(id+"\t"+name+"\t"+sex+"\t"+age);
    }

}
